
package org.apache.osgimaker.analyse.algorithm;

import org.apache.osgimaker.analyse.algorithm.renderer.AtomicVertexRenderer;
import org.apache.osgimaker.analyse.algorithm.renderer.TemplateBasedClassRenderer;
import org.apache.osgimaker.analyse.algorithm.renderer.XMLAtomicVertexRenderer;


/**
 * XML renderer of an {@link AtomicVertex} with 
 * {@link NameAttributes}.
 * 
 */
public class XMLPackageRenderer extends XMLAtomicVertexRenderer 
{
  protected String getElement()
  {
    return "package";
  }

  protected String getRefElement()
  {
    return "packageRef";
  }

  protected AtomicVertexRenderer getVertexRenderer()
  {
    return new TemplateBasedClassRenderer("    <" + getElement()
            + " name=\"{0}\" sources=\"{9}\"  size=\"{2}\" usedBy=\"{4}\""
            + " usesInternal=\"{5}\" usesExternal=\"{6}\" layer=\"{7}\"" 
            + " cycle=\"{8}\">\n");
  }

} //class